/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package elaborate.h2x.transform.position.schema.state;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author lendle
 */
public class DefaultPseudoStateImpl extends DefaultStateImpl implements PseudoState{

    protected List<State> childStates = new ArrayList<State>();
    protected int min=1;
    protected int max=1;//-1 means unbounded

    /**
     * Get the value of max
     *
     * @return the value of max
     */
    public int getMax() {
        return max;
    }

    /**
     * Set the value of max
     *
     * @param max new value of max
     */
    public void setMax(int max) {
        this.max = max;
    }


    /**
     * Get the value of min
     *
     * @return the value of min
     */
    public int getMin() {
        return min;
    }

    /**
     * Set the value of min
     *
     * @param min new value of min
     */
    public void setMin(int min) {
        this.min = min;
    }


    /**
     * Get the value of childStates
     *
     * @return the value of childStates
     */
    public List<State> getChildStates() {
        return  new ArrayList<State>(childStates);
    }

    /**
     * Set the value of childStates
     *
     * @param childStates new value of childStates
     */
    public void setChildStates(List<State> childStates) {
        this.childStates.clear();
        this.childStates.addAll(childStates);
    }

    public void addChildState(State state) {
        this.childStates.add(state);
    }
}
